package com.qf.advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/9/28 21:18
 */
@Component
@Aspect
public class AnnotationAdvice {

    @Pointcut(value = "execution(public void com.qf.service.impl.PersonServiceImpl.save())")
    public void pointcut(){}

    @AfterReturning(value = "pointcut()",returning = "result")
    public void afterReturning(JoinPoint jp,Object result){
        System.out.println("后置增强注解----");
    }
}
